package org.jgs1904.oopbase.test.nestedclass.anonymousclass;

/**
 * @author: 默苍璃
 * @date: 2022-09-14 17:15
 * 匿名类
 */
public class Outer {
    private String name;

    Outer(String name) {
        this.name = name;
    }

    void asyncHello() {
        //匿名类
        Runnable r = new Runnable() {
            @Override
            public void run() {
                System.out.println("Hello, " + Outer.this.name);
            }
        };
        new Thread(r).start();
    }
}
